/**
 * @file   GetClientMethodReturnValueInfoRequestPacket.h
 * @author Djuro Drljaca (djurodrljaca@gmail.com)
 * @date   2013-05-30
 * @brief  DataBus Get Client Method Return Value Info Request packet.
 *
 * Copyright (C) 2013  Djuro Drljaca <djurodrljaca@gmail.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef LIBDATABUS_COMMON_GETCLIENTMETHODRETURNVALUEINFOREQUESTPACKET_H
#define LIBDATABUS_COMMON_GETCLIENTMETHODRETURNVALUEINFOREQUESTPACKET_H

#include <DataBus/Common/Packet.h>

namespace DataBus
{
namespace GetClientMethodReturnValueInfoRequestPacket
{
/**
 * @brief Create GetClientMethodReturnValueInfoRequest packet
 *
 * @param source            Source Client ID
 * @param destination       Destination Client ID
 * @param packetId          Packet ID
 * @param methodId          Method ID
 * @param returnValueIndex  Return Value Index
 *
 * @param[out] packet   DataBus Packet
 *
 * @retval true     Success
 * @retval false    Error
 */
DATABUSSHARED_EXPORT bool create(const quint8 source,
                                 const quint8 destination,
                                 const quint8 packetId,
                                 const quint8 methodId,
                                 const quint8 returnValueIndex,
                                 Packet *packet);

/**
 * @brief Parse Packet
 *
 * @param packet            DataBus Packet
 *
 * @param[out] methodId         Method ID
 * @param[out] returnValueIndex Return Value Index
 *
 * @retval true     Success
 * @retval false    Failed
 */
DATABUSSHARED_EXPORT bool parse(const Packet &packet,
                                quint8 *methodId,
                                quint8 *returnValueIndex);
}
}

#endif // LIBDATABUS_COMMON_GETCLIENTMETHODRETURNVALUEINFOREQUESTPACKET_H
